home *** CD-ROM | disk | FTP | other *** search
- property saveButton, cancelButton
- global saveDialogBox, fileMgr, PCflag, contentList
-
- on birth me
- init(me)
- if PCflag then
- set the textFont of field "filename field" to "Arial"
- set the textSize of field "filename field" to 10
- set the textStyle of field "filename field" to "bold"
- set the textFont of field "credits field" to "Arial"
- set the textSize of field "credits field" to 9
- set the textStyle of field "credits field" to "bold"
- else
- set the textFont of field "filename field" to "Geneva"
- set the textSize of field "filename field" to 10
- set the textStyle of field "filename field" to "bold"
- set the textFont of field "credits field" to "Geneva"
- set the textSize of field "credits field" to 9
- set the textStyle of field "credits field" to "bold"
- end if
- return me
- end
-
- on init me
- set saveButton to 2
- set cancelButton to 3
- puppetSprite(saveButton, 1)
- puppetSprite(cancelButton, 1)
- repeat with theSprite = 10 to 22
- puppetSprite(theSprite, 1)
- end repeat
- showThumbnails(me)
- end
-
- on handleButton me, whichSprite
- if hiliteButton(whichSprite) then
- if whichSprite = 2 then
- saveCartoon(me)
- else
- hide(me)
- end if
- end if
- end
-
- on hide me
- set the modal of saveDialogBox to 0
- forget(saveDialogBox)
- end
-
- on saveCartoon me
- set theCartoonName to the text of field "filename field"
- set theCartoonCredits to the text of field "credits field"
- if theCartoonName <> EMPTY then
- tell the stage
- writetoonData(fileMgr, theCartoonName, theCartoonCredits)
- end tell
- hide(me)
- else
- beep()
- end if
- end
-
- on showThumbnails me
- set positionTable to [[54, 54], [90, 54], [90, 90], [54, 90], [18, 90], [18, 54], [18, 18], [54, 18], [90, 18], [126, 18], [126, 54], [126, 90]]
- set bgdThumbnail to getAt(contentList, 1) & ".thumb"
- set the loc of sprite 10 to point(94, 84)
- set the castNum of sprite 10 to the number of cast bgdThumbnail
- set listOfCharacters to getAt(contentList, 2)
- set thumbnailSprite to 11
- set count to 1
- repeat with castThumbnail in listOfCharacters
- set thePoints to getAt(positionTable, count)
- set x to the left of sprite 10 + getAt(thePoints, 1)
- set y to the top of sprite 10 + getAt(thePoints, 2)
- set the loc of sprite thumbnailSprite to point(x, y)
- set the castNum of sprite thumbnailSprite to the number of cast (castThumbnail & ".thumb")
- set thumbnailSprite to thumbnailSprite + 1
- set count to count + 1
- end repeat
- updateStage()
- end
-